package com.zb.entity.vo;

import com.zb.annotation.IntegerPattern;
import com.zb.utils.VerificUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * @Author WEN
 * @Date 2023/8/8 0008
 **/
@Data
@ApiModel("企业续费对象")
public class CustomerRenewalVo {
    @NotNull(message = "企业ID不能为空")
    @Size(min = 1, message = "至少选择一个企业")
    @ApiModelProperty(value = "企业ID集合", required = true)
    private List<Long> custAccIdList;

    @NotNull(message = "续期类型不能为空")
    @IntegerPattern(regexp = "^[1|2|3]$", message = "续期类型不合法！")
    @ApiModelProperty(value = "续期类型：1-天，2-季度，3-年度", required = true, example = "3")
    private Integer type;

    @NotNull(message = "续期类型值不能为空")
    @IntegerPattern(regexp = VerificUtil.POSITIVE_NUMBER, message = "续期类型值不合法！必须为大于0的正整数")
    @ApiModelProperty(value = "续期类型值", required = true, example = "1")
    private Integer qty;

    @Length(max = 500, message = "备注说明限制500个字符以内")
    @ApiModelProperty(value = "备注说明")
    public String remark;

}
